package com.tr09.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.tr09.dao.GoodsxqDAO;
import com.tr09.entity.Commoditye;

/**
 * Servlet implementation class ShoseListServlet
 */
@WebServlet("/Shose_List")
public class ShoseListServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private GoodsxqDAO goodsxqDAO=new GoodsxqDAO();
    /*
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	request.getRequestDispatcher("utf-8");
	List<Commoditye> list=goodsxqDAO.selectcommditye(4);
	request.setAttribute("list", list);
	System.out.println(list);
    request.getRequestDispatcher("shose.jsp").forward(request, response);
	}
}
